{extend name='common/_container'}
{block name="content"}
<div class="ibox float-e-margins">
<input type="hidden" name='id' id='id' value="{$info.id}" />
	<div class="ibox-content">
		<div class="form-horizontal" id="CodeInfoForm">
			<div class="row">
				<div class="col-sm-12">
				<!-- form start -->
					<div class="form-group">
						<label class="col-sm-2 control-label">连接标题：</label>
						<div class="col-sm-9">
							<input type="text" id="title" value="{$info.title}" name="title" class="form-control" placeholder="请输入连接标题">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">链接地址：</label>
						<div class="col-sm-9">
							<input type="text" id="url" value="{$info.url}" name="url" class="form-control" placeholder="请输入链接地址">
						</div>
					</div>
					<div class="form-group layui-form">
						<label class="col-sm-2 control-label">状态：</label>
						<div class="col-sm-9">
							<?php if(!isset($info['status'])){ $info['status'] = 1; }; ?>
							<input name="status" value="1" type="radio" {if condition="$info.status eq '1'"}checked{/if} title="开启">
							<input name="status" value="0" type="radio" {if condition="$info.status eq '0'"}checked{/if} title="关闭">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">logo：</label>
						<div class="col-sm-6">
							<input type="text" id="logo" value="{$info.logo}" {if condition="config('my.img_show_status') eq true"}onmousemove="showBigPic(this.value)" onmouseout="closeimg()"{/if} name="logo" class="form-control" placeholder="请输入logo">
							<span class="help-block m-b-none logo_process"></span>
						</div>
						<div class="col-sm-2" style="position:relative; right:30px;">
							<span id="logo_upload"></span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">所属分类：</label>
						<div class="col-sm-9">
							<select lay-ignore name="cata_id" class="form-control" id="cata_id">
								<option value="">请选择</option>
								{sql query="select cata_id,class_name from cd_link_catagory"}
									<option value="{$sql.cata_id}" {if condition="$info.cata_id eq $sql.cata_id"}selected{/if}>{$sql.class_name}</option>
								{/sql}
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">创建时间：</label>
						<div class="col-sm-9">
							<input type="text" value="{if condition="$info.create_time neq ''"}{$info.create_time|date='Y-m-d H:i:s'}{/if}" name="create_time"  placeholder="请输入创建时间" class="form-control layer-date" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" id="create_time">
						</div>
					</div>
				<!-- form end -->
				</div>
			</div>
			<div class="hr-line-dashed"></div>
			<div class="row btn-group-m-t">
				<div class="col-sm-9 col-sm-offset-1">
					<button type="button" class="btn btn-primary" onclick="CodeInfoDlg.update()" id="ensure">
						<i class="fa fa-check"></i>&nbsp;确认提交
					</button>
					<button type="button" class="btn btn-danger" onclick="CodeInfoDlg.close()" id="cancel">
						<i class="fa fa-eraser"></i>&nbsp;取消
					</button>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="__PUBLIC__/static/js/admin/Link/Link.js?t=<?php echo rand(1000,9999)?>" charset="utf-8"></script>
<script src="__PUBLIC__/static/js/upload.js" charset="utf-8"></script>
<script src="__PUBLIC__/static/js/plugins/layui/layui.js?t=1498856285724" charset="utf-8"></script>
<script>
layui.config({dir: '__PUBLIC__/static/js/plugins/layui/'});
	layui.use(['layer', 'form'], function () {
	window.layer = layui.layer;
	window.form = layui.form();
});
layui.use('element', function(){
	var element = layui.element();
	element.on('tab(test)', function(elem){
	});
});
uploader('logo_upload','logo','image',false,'','{:url("admin/Upload/uploadImages")}');
</script>


{/block}
